using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace DataLayer.Model
{
    public class FitbitAccount
    {
        [Key]
        public int Id { get; set; }

        [Required]
        [MaxLength(50)]
        public string UserName { get; set; }

        [Required]
        [MaxLength(50)]
        public string Password { get; set; }

        [MaxLength(6)]
        public string OwnerID { get; set; }

        [MaxLength(32)]
        public string AccessToken { get; set; }

        [MaxLength(32)]
        public string AccessSecret { get; set; }

        public bool IsSubscribed { get; set; }

        public bool ShouldRemove { get; set; }

        public virtual ICollection<FitbitData> FitbitDatas { get; set; }

        public virtual ICollection<Player> Players { get; set; }


        public FitbitAccount()
        {
            this.FitbitDatas = new List<FitbitData>();
            this.Players = new List<Player>();
        }
    }
}
